import { post, get, put, Delete, form } from "@/axios/http.js";
import { basicApi } from "@/api/index.js"
//模块数据
export default {
    namespaced: true,
    state: {},
    actions: {
        // 删除留言
        deleteLeave({ commit },params){
            return Delete(basicApi.leave.deleteLeave, params).then(res=>{
                return res
            });
        },
        // 主人寄语
        masterMessage({ commit },params){
            return post(basicApi.leave.masterMessage, params).then(res=>{
                return res
            });
        },
        // 最新照片
        latestPhotos({ commit },params){
            return get(basicApi.leave.latestPhotos, params).then(res=>{
                return res
            });
        },
        // 获取主人寄语
        getMasterMessage({ commit },params){
            return get(basicApi.leave.getMasterMessage, params).then(res=>{
                return res
            });
        },
        // 回复留言
        replyLeave({ commit },params){
            return post(basicApi.leave.replyLeave, params).then(res=>{
                return res
            });
        },
        // 留言列表
        getLeaveList({ commit },params){
            return get(basicApi.leave.getLeaveList, params).then(res=>{
                return res
            });
        },
        // 新增留言
        insertLeave({ commit },params){
            return post(basicApi.leave.insertLeave, params).then(res=>{
                return res
            });
        },
    },
    mutations: {},
};
